<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
 *
 * @package     anime
 * @author      Do Ngoc Son (ngocson2306@gmail.com)
 * @copyright   PHP TEAM
 * @link        http://phpandmysql.net
 * @since       Version 1.0
 * @phone       0982644370
 *
 */
class Config_model extends MY_Model{
	public $table = 'config';
	public $key   = 'cf_id';
	public function __construct(){
		parent:: __construct();
		
	}

    public function save($id=false,$data=array()){
    	if(!$id){
    		$this->insert($data);
    	}
    	$result = $this->update($id,$data);
    	if($result){
    		return $id;
    	}
    	return false;
    } 

    public function get_config_info(){
        $param_config  = array( 'cf_title', 'cf_address', 'cf_numrecord', 'cf_seo', 'cf_meta', 'cf_viewed', 'cf_description', 'cf_email', 'cf_fanpage','cf_phone');
        return $this->get_info(1,$param_config);
    }

}